program ANTPacker;
//{$TYPEINFO ON}
//{$STACKFRAMES ON}

uses
  KOL, PakMan {, FASTMM4}, ERR;
{$R *.res}
var
  PakMaker: PPakMan;

procedure PakDir(Path: string);
begin
  PakMaker := NewPakMan;
  PakMaker.Package(Path);
  PakMaker.Free;
end;

procedure UnPakDir(Path: string);
begin
  PakMaker := NewPakMan;
  PakMaker.UnPackage(Path);
  PakMaker.Free;
end;

begin
//  ReportMemoryLeaksOnShutdown:= DebugHook <> 0;
  if DirectoryExists(ParamStr(1)) then
    PakDir(ParamStr(1))
  else if FileExists(ParamStr(1)) then
    UnPakDir(ParamStr(1));
end.

